''' Mission 7 - Personal Billboard Spicy Remix 3A This remix uses two lists for A and B. The first list is images, but it can be anything. The second list is a mix but again can be anything. Both lists should have the same number of items. -It also includes the button to break the loop and end the program- ''' from codex import * from time import sleep choice = 0 my_pictures = [pics.HEART, pics.PLANE, pics.TSHIRT, pics.TIARA, pics.HOUSE, pics.TARGET, pics.ASLEEP, pics.HAPPY] my_otherlist = [GREEN, "Happy Day", RED, "Be awesome!", YELLOW, "Live life", BLUE, "I'll be back", PURPLE] LAST_INDEX = len(my_pictures) - 1 my_list = my_pictures # MAIN PROGRAM while True: # display item my_item = my_list[choice] if type(my_item) == tuple: display.fill(my_item) else: display.show(my_item) # select list to display if buttons.was_pressed(BTN_A): my_list = my_pictures if buttons.was_pressed(BTN_B): my_list = my_otherlist # scroll forward and backward if buttons.was_pressed(BTN_L): choice = choice - 1 if choice < 0: choice = LAST_INDEX if buttons.was_pressed(BTN_R): choice = choice + 1 if choice > LAST_INDEX: choice = 0 # break out of loop to end if buttons.was_pressed(BTN_D): break